<style>
  .show_one .swiper-button{
    display: none !important;
  } 
</style>
<div class="review_2 {% if section.settings.show_one != blank %} show_one {% endif %}">
  <div class="review_1">
      <div class="page-width">
       {% if section.settings.title != blank %}
       <div class="title-wrapper-with-link title-wrapper--self-padded-mobile{% if section.settings.title == blank %} title-wrapper-with-link--no-heading{% endif %}">
        <h2 class="title">
          {{ section.settings.title | escape }}
        </h2>
        </div>
       {% endif %}
       
       {% if section.settings.text != blank %}
       <div class="text-review">{{ section.settings.text }}</div>
      {% endif %}

         <div class="swiper-father">
          <div class="reviews_{{ section.id }} reviewSwiper swiper-container Swiper">
              <div class="tenways_review swiper-wrapper">
                  {%- for block in section.blocks -%}
      
                 <div class="reviewAll swiper-slide {%- if section.blocks.size == 1 -%} swiper-no-swiping {%- endif -%}" {{ block.shopify_attributes }}>
                    <div class="review_right grid__item">
                      <div class="tenways-yt">
                        <div class="right">
                          <div class="review_in">
                           {%- if block.settings.title != blank -%}
                           <div class="text">{{ block.settings.title }}</div>
                          {%- endif -%}
                          {%- if block.settings.html != blank -%}
                          <div class="html">{{ block.settings.html }}</div>
                         {%- endif -%}
                          </div>
           
                          {%- if block.settings.richtext != blank -%}
                          <div class="rte">{{ block.settings.richtext }}</div>
                       {%- endif -%}
                        </div>
                      </div>
                    </div>
                    <div class="review_left grid__item">
                     <div class="video_review">
                      <div class="product__media media" style="padding-bottom: 56.25%;">
                        <iframe loading="lazy" src="https://www.youtube.com/embed/{{ block.settings.video_url.id }}?enablejsapi=1" class="js-youtube" allow="autoplay; encrypted-media" allowfullscreen></iframe>
                      </div> 
                     </div>                 
                   </div>
                 </div>
      
                 {%- endfor -%}
              </div>
          </div>
          <div class="swiper-button swiper-button-next ten-vi next_{{ section.id }}">{% render 'swiper-next' %}</div>
          <div class="swiper-button swiper-button-prev ten-vi prev_{{ section.id }}">{% render 'swiper-prev' %}</div>
          <div class="swiper-button swiper-pagination pagination_{{ section.id }}"></div>
         </div>
        
      </div>    
  </div>
</div>

<script>
  var swiper = new Swiper(".reviews_{{ section.id }}", {
    slidesPerView: 1,
    spaceBetween: 30,
    grabCursor: true,
    loop:true,
    observer:true,
    observeParents:true,
    pagination: {
        el: ".pagination_{{ section.id }}",
        clickable: true,
        dynamicBullets: true,
        dynamicMainBullets: 6
      },
      navigation: {
        nextEl: ".next_{{ section.id }}",
        prevEl: ".prev_{{ section.id }}",
      },
  });
</script>

{% schema %}
{
"name": "Tenways reviews",
"tag": "section",
"class": "reviews-section spaced-section spaced-section--full-width",
"settings": [
  {
    "type": "header",
    "content": "Headding"
  },
  {
      "type": "checkbox",
      "id": "show_one",
      "default": false,
      "label": "Show one"
  },
  {
    "type": "text",
    "id": "title",
    "default":"title",
    "label": "Title"
  },
  {
    "type": "text",
    "id": "text",
    "label": "Text"
  }
],
"blocks": [
 {
  "type": "heading",
  "name": "heading",
  "settings":[
   {
      "type": "html",
      "id": "title",
      "default":"title",
      "label": "Title"
    },
    {
      "type": "richtext",
      "id": "html",
      "default":"<p>richtext</p>",
      "label": "type"
    },
    {
      "type": "richtext",
      "id": "richtext",
      "default":"<p>richtext</p>",
      "label": "Description"
    },
    {
      "type": "video_url",
      "id": "video_url",
      "accept": [
        "youtube",
        "vimeo"
      ],
      "default": "https:\/\/www.youtube.com\/watch?v=_9VUPq3SxOc",
      "label": "video_url",
      "info": "video_url"
    }
   ]
 }
],
"presets": [
  {
    "name": "Tenways reviews"
  }
]
}
{% endschema %}